package com.firebugsoft.calc.dubbo.consumer;

import com.firebugsoft.calc.dubbo.consumer.service.ProxyService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Application.class, args);
//        run.getBean(ICalcService.class);//error
        ProxyService proxyService = run.getBean(ProxyService.class);
        System.out.println("a + b = " + proxyService.add(1, 2));
    }
}
